﻿using AppFramework.Admin.Models.Edition;
using AppFramework.Admin.Models.Organizations;
using AppFramework.Admin.Models.Update;
using AppFramework.Admin.Models.Users;
using AppFramework.App.Shared.MultiTenancy.Dto;
using AppFramework.Shared.Models.Configuration;
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Prism.Ioc;

namespace AppFramework.Admin.Validations
{
    public static class AdminValidatorExtensions
    {
        public static void AddValidators(this IContainerRegistry services)
        {

            services.RegisterScoped<IValidator<UserCreateOrUpdateModel>, UserCreateOrUpdateValidator>();
            services.RegisterScoped<IValidator<CreateOrganizationUnitModel>, OrganizationUnitValidator>();
            services.RegisterScoped<IValidator<CreateTenantInput>, CreateTenantValidator>();
            services.RegisterScoped<IValidator<TenantEditDto>, UpdateTenantValidator>();
            services.RegisterScoped<IValidator<EditionCreateModel>, CreateEditionValidator>();
            services.RegisterScoped<IValidator<HostSettingsEditModel>, SettingsValidator>();
            services.RegisterScoped<IValidator<VersionListModel>, VersionValidator>();

        }

    }
}
